﻿using System;

namespace RexToy.UI.Controls
{
    public static class ButtonStyleHelper
    {
        public static void SetDomNodeClass(DomNode node, ButtonStatus status, Palette palette)
        {
            ButtonStatus[] stArr = new ButtonStatus[] { ButtonStatus.Up, ButtonStatus.Down, ButtonStatus.Hover };

            foreach (var st in stArr)
            {
                string className = StringExt.Format("ui-btn-{0}-{1}", st, palette);
                if (st == status)
                    node.AppendClass(className);
                else
                    node.RemoveClass(className);
            }
        }
    }
}
